package Game.Players.Units;

/**
 * Created by sech_92 on 17.12.2014.
 */
public class Weapons {
    private String name;
    private int damage;
    private int damage_delta;
    private int tpr;    //times per round, e. g. hits or shots
    private int ammo;   //may be renamed, should be used as a common resource for hits too

    private Weapons(String _name, int _dmg, int _dmd, int _tpr, int _res) {
        name = _name;
        damage = _dmg;
        damage_delta = _dmd;
        tpr = _tpr;
        ammo = _res;
    }

    public static void makeWeaponz(TLightInfantry t, Weapons w[]) {
        switch (t) {
            case Cultist:
                w[0] = new Weapons("Laspistol", 15, 3, 3, 25);//range
                w[1] = new Weapons("Dagger", 20, 5, 3, 42);//close
                break;
            case Guardian:
                w[0] = new Weapons("Blast pistol", 10, 1, 6, 45);//range
                w[1] = new Weapons("Whych knife", 45, 10, 1, 10);//close
                break;
            case Guardsman:
                w[0] = new Weapons("Lasgun", 10, 1, 6, 45);//range
                w[1] = new Weapons("Knife", 45, 10, 1, 10);//close
                break;
            case Scarabs:
                w[0] = new Weapons("Jerk hit", 10, 1, 6, 45);//range
                w[1] = new Weapons("Jaws", 45, 10, 1, 10);//close
                break;
            case Scout_Sniper:
                w[0] = new Weapons("Mk.IX Sniper Rifle", 50, 4, 3, 45);//range
                w[1] = new Weapons("Knife", 5, 0, 2, 10);//close
                break;
            case Shoota_boy:
                w[0] = new Weapons("Fazt Shootin gun", 10, 1, 6, 45);//range
                w[1] = new Weapons("Knife", 45, 10, 1, 10);//close
                break;
            case Slugga_boy:
                w[0] = new Weapons("Piztol", 10, 1, 6, 45);//range
                w[1] = new Weapons("Hatchet", 45, 10, 1, 10);//close
                break;
            case Ranger:
                w[0] = new Weapons("Sniper Longarm", 10, 1, 6, 45);//range
                w[1] = new Weapons("Wych knife", 45, 10, 1, 10);//close
                break;
            case XV15:
                w[0] = new Weapons("Plasma pistol", 10, 1, 6, 45);//range
                w[1] = new Weapons("Knife", 45, 10, 1, 10);//close
                break;

            default:
                w[0] = null;
                w[1] = null;
                break;
        }
    }
    public static void makeWeaponz(THeavyInfantry t, Weapons w[]) {
        switch (t) {
            case Space_Marine:
                w[0] = new Weapons("Bolter", 20, 4, 5, 200);//range
                w[1] = new Weapons("Chainsword", 40, 8, 3, 8);//close
                break;
            case Assault_Marine:
                w[0] = new Weapons("Bolt pistol", 20, 4, 5, 200);//range
                w[1] = new Weapons("Chainsword", 40, 8, 3, 8);//close
                break;
            case Chaos_Marine:
                w[0] = new Weapons("Bolt pistol", 20, 4, 5, 200);//range
                w[1] = new Weapons("Hatchet", 40, 8, 3, 8);//close
                break;
            case Chaos_Raptor:
                w[0] = new Weapons("Bolt pistol", 20, 4, 5, 200);//range
                w[1] = new Weapons("Hatchet", 40, 8, 3, 8);//close
                break;
            case Banshee:
                w[0] = new Weapons("Powerblade", 20, 4, 5, 200);//range
                w[1] = new Weapons("Lasblaster", 40, 8, 3, 8);//close
                break;
            case Storm_boy:
                w[0] = new Weapons("Shootin Gun", 20, 4, 5, 200);//range
                w[1] = new Weapons("Hatchet", 40, 8, 3, 8);//close
                break;
            case Ripper:
                w[0] = new Weapons("Splinter cannon", 20, 4, 5, 200);//range
                w[1] = new Weapons("Glimmersteel sickle", 40, 8, 3, 8);//close
                break;
            case Necron_Warrior:
                w[0] = new Weapons("Gauss flayer", 20, 4, 5, 200);//range
                w[1] = new Weapons("Gunblade", 40, 8, 3, 8);//close
                break;
            case Immortal:
                w[0] = new Weapons("Gauss blaster", 20, 4, 5, 200);//range
                w[1] = new Weapons("Gunblade", 40, 8, 3, 8);//close
                break;
            case Flayed_one:
                w[0] = new Weapons("Jerk hit", 20, 4, 5, 200);//range
                w[1] = new Weapons("Claws", 40, 8, 3, 8);//close
                break;
            case Flash_Gitz:
                w[0] = new Weapons("Big shootin gun", 20, 4, 5, 200);//range
                w[1] = new Weapons("Hatchet", 40, 8, 3, 8);//close
                break;
            case Nob:
                w[0] = new Weapons("Big pistol", 20, 4, 5, 200);//range
                w[1] = new Weapons("Powerclaw", 40, 8, 3, 8);//close
                break;
            case Khorn_Berserker:
                w[0] = new Weapons("Powerclaws", 20, 4, 5, 200);//range
                w[1] = new Weapons("Fists", 40, 8, 3, 8);//close
                break;
            case Kasrkin:
                w[0] = new Weapons("Melta-gun", 20, 4, 5, 200);//range
                w[1] = new Weapons("Knife", 40, 8, 3, 8);//close
                break;
            case Ogryn:
                w[0] = new Weapons("Ripper gun", 20, 4, 5, 200);//range
                w[1] = new Weapons("Bonesword", 40, 8, 3, 8);//close
                break;
            case Warp_Spider:
                w[0] = new Weapons("Shredder", 20, 4, 5, 200);//range
                w[1] = new Weapons("Wych knife", 40, 8, 3, 8);//close
                break;
            case Fire_Warrior:
                w[0] = new Weapons("Pulse Rifle", 20, 4, 5, 200);//range
                w[1] = new Weapons("Shocker", 40, 8, 3, 8);//close
                break;
            case Kroot:
                w[0] = new Weapons("Neutron blaster", 20, 4, 5, 200);//range
                w[1] = new Weapons("Spear", 40, 8, 3, 8);//close
                break;
            case Kroot_hound:
                w[0] = new Weapons("Jerk hit", 20, 4, 5, 200);//range
                w[1] = new Weapons("Jaws", 40, 8, 3, 8);//close
                break;
            case Tank_busta:
                w[0] = new Weapons("Veri big slowgun", 20, 4, 5, 200);//range
                w[1] = new Weapons("Hatchet", 40, 8, 3, 8);//close
                break;

            default:
                w[0] = null;
                w[1] = null;
                break;
        }
    }
    public static void makeWeaponz(TScoutMachines t, Weapons w[]) {
        switch (t) {
            case Sentinel:
                w[0] = new Weapons("Laser cannon", 60, 15, 5, 50);//primary
                break;
            case Rhino:
                w[0] = new Weapons("Machine gun", 60, 15, 5, 50);//primary
                break;
            case Wraith:
                w[0] = new Weapons("Claws", 60, 15, 5, 50);//primary
                break;
            case Devilfish:
                w[0] = new Weapons("Fusion blaster", 60, 15, 5, 50);//primary
                break;
            case Land_speeder:
                w[0] = new Weapons("Twin heavy bolter", 60, 15, 5, 50);//primary
                break;
            case Viper:
                w[0] = new Weapons("Shuriken cannon", 60, 15, 5, 50);//primary
                break;
            case Chimera:
                w[0] = new Weapons("Laser cannon", 60, 15, 5, 50);//primary
                break;
            case Trukk:
                w[0] = new Weapons("Machine gun", 60, 15, 5, 50);//primary
                break;

            default:
                w[0] = null;
                break;
        }
    }
    public static void makeWeaponz(TLightMachines t, Weapons w[]) {
        switch (t) {
            case Dreadnought:
                w[0] = new Weapons("Flamer", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Powerclaw", 40, 7, 5, 100);//secondary
                break;
            case Support_Dreadnought:
                w[0] = new Weapons("Plasma cannon", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Rocket launcher", 40, 7, 5, 100);//secondary
                break;
            case Tomb_spider:
                w[0] = new Weapons("Gauss cannon", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Claws", 40, 7, 5, 100);//secondary
                break;
            case Defiler:
                w[0] = new Weapons("Warp flamer", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Claws", 40, 7, 5, 100);//secondary
                break;
            case Hellhound:
                w[0] = new Weapons("Heavy flamer", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Machine gun", 40, 7, 5, 100);//secondary
                break;
            case Wraithlord:
                w[0] = new Weapons("Light Spear", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Flamer", 40, 7, 5, 100);//secondary
                break;
            case Killa_Can:
                w[0] = new Weapons("Big shootin gun", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Circular saw", 40, 7, 5, 100);//secondary
                break;
            case Wartrak:
                w[0] = new Weapons("Rocket thrower", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Big shootin gun", 40, 7, 5, 100);//secondary
                break;
            case XV88:
                w[0] = new Weapons("Twin railgun", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Rocket launcher", 40, 7, 5, 100);//secondary
                break;
            case XV8_Crisis:
                w[0] = new Weapons("Rocket launcher", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Flamer", 40, 7, 5, 100);//secondary
                break;

            default:
                w[0] = null;
                w[1] = null;
                break;
        }
    }
    public static void makeWeaponz(THeavyMachines t, Weapons w[]) {
        switch (t) {
            case Chaos_Predator://placeholding values
                w[0] = new Weapons("Main cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Sponson warp cannons", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Machine gun", 40, 8, 3, 8);//assisting
                break;
            case Predator://placeholding values
                w[0] = new Weapons("Main cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Sponson laser cannons", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Machine gun", 40, 8, 3, 8);//assisting
                break;
            case Falcon://placeholding values
                w[0] = new Weapons("Twin Light Spear", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Lasers", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Shuriken cannons", 40, 8, 3, 8);//assisting
                break;
            case Fire_Prism://placeholding values
                w[0] = new Weapons("Prism cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Lasers", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Shuriken cannons", 40, 8, 3, 8);//assisting
                break;
            case Hammerhead_gunship://placeholding values
                w[0] = new Weapons("Railgun", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Ion Cannon", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Fusion Blaster", 40, 8, 3, 8);//assisting
                break;
            case Skyray_gunship://placeholding values
                w[0] = new Weapons("Missile Pod", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Ion Cannon", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Fusion Blaster", 40, 8, 3, 8);//assisting
                break;
            case Destroyer://placeholding values
                w[0] = new Weapons("Gauss cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Gunblades", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Claws", 40, 8, 3, 8);//assisting
                break;
            case Heavy_Destroyer://placeholding values
                w[0] = new Weapons("Synaptic disintegrator", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Gunblades", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Claws", 40, 8, 3, 8);//assisting
                break;
            case Lord_Destroyer://placeholding values
                w[0] = new Weapons("Tesla cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Gauss staff", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Blades", 40, 8, 3, 8);//assisting
                break;
            case Leman_Russ://placeholding values
                w[0] = new Weapons("Main cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Sponson Lasers", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Machine gun", 40, 8, 3, 8);//assisting
                break;
            case Looted_Leman_Russ://placeholding values
                w[0] = new Weapons("Main shoota", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Sponson shootas", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Fast shoota", 40, 8, 3, 8);//assisting
                break;

            default:
                w[0] = null;
                w[1] = null;
                w[2] = null;
                break;
        }
    }
    public static void makeWeaponz(TFightingFortress t, Weapons w[]) {
        switch (t) {
            case Land_rider://placeholding values
                w[0] = new Weapons("Twin cannons", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Twin lasers", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Twin flamethrowers", 40, 8, 3, 8);//assisting
                w[3] = new Weapons("Machine gun", 40, 8, 3, 8);//reserve
                break;
            case Bane_Blade://placeholding values
                w[0] = new Weapons("Main cannon", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Twin lasers", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Rocket launcher", 40, 8, 3, 8);//assisting
                w[3] = new Weapons("Machine gun", 40, 8, 3, 8);//reserve
                break;
            case Squiggoth://placeholding values
                w[0] = new Weapons("Very big shoota", 20, 4, 5, 200);//primary
                w[1] = new Weapons("4 smalla shootas", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Fast shoota", 40, 8, 3, 8);//assisting
                w[3] = new Weapons("Tusks", 40, 8, 3, 8);//reserve
                break;
            case Monolith://placeholding values
                w[0] = new Weapons("4 Gauss Disintegrators", 20, 4, 5, 200);//primary
                w[1] = new Weapons("Scream of terror", 40, 8, 3, 8);//secondary
                w[2] = new Weapons("Tesla cannon", 40, 8, 3, 8);//assisting
                w[3] = new Weapons("Gauss blaster", 40, 8, 3, 8);//reserve
                break;

            default:
                w[0] = null;
                w[1] = null;
                w[2] = null;
                w[3] = null;
                break;
        }
    }

    public static void makeWeaponz(TMeatBox t, Weapons w[]) {
        switch (t) {
            case Avatar:
                w[0] = new Weapons("Powersword", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Fists", 40, 7, 5, 100);//secondary
                break;
            case Nightbringer:
                w[0] = new Weapons("Scythe of death", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Terror", 40, 7, 5, 100);//secondary
                break;
            case Daemon_Prince:
                w[0] = new Weapons("Daemon sabre", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Claws", 40, 7, 5, 100);//secondary
                break;
            case Great_Knarloc:
                w[0] = new Weapons("Jaws", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Claws", 40, 7, 5, 100);//secondary
                break;
            case Bloodthirster:
                w[0] = new Weapons("Tusks", 250, 50, 1, 27);//primary
                w[1] = new Weapons("Claws", 40, 7, 5, 100);//secondary
                break;

            default:
                w[0] = null;
                w[1] = null;
                break;
        }
    }

    public int getDamage() {
        return damage;
    }

    public int getAmmo() {
        return ammo;
    }

    public String getName() {
        return name;
    }

    public int getDamage_delta() {
        return damage_delta;
    }

    public void setAmmo(int a) {
        ammo = (a < 0 ? 0 : a);
    }
    //here we need attack method implementation
}
